import React from 'react';
import routes from './router/router.config'
import RouterView from './router/RouterView'
import { HashRouter as Router} from 'react-router-dom'
// import store from './store/index';
// import StoreContext from './context/StoreContext';
import Loading from './components/Loading';
import useStore from './context/useStore';
import { useObserver } from 'mobx-react-lite';

const App: React.FC = () => {
  let {global} = useStore();
  return useObserver(() => <Router>
    <RouterView routes={routes} />
    {global.isShow?<Loading />:null}
  </Router>)
}
export default App;
